In this paper, we explore remarkable similarities between multi-transactionalbehaviors of smart contracts in cryptocurrencies such as Ethereum and classicalproblems of shared-memory concurrency. We examine two real-world examples fromthe Ethereum blockchain and analyzing how they are vulnerable to bugs that areclosely reminiscent to those that often occur in traditional concurrentprograms. We then elaborate on the relation between observable contractbehaviors and well-studied concurrency topics, such as atomicity, interference,synchronization, and resource ownership. The describedcontracts-as-concurrent-objects analogy provides deeper understanding ofpotential threats for smart contracts, indicate better engineering practices,and enable applications of existing state-of-the-art formal verificationtechniques.
展开▼